<?php
	class View {
		public static $tpl;
		
		public function __construct() {
			include_once F_INC . 'template.class.php';
			self::$tpl = new TPL();
		}
		
		public function getData($data) {
			if (is_array($data)) {
				foreach ($data as $tag => $value) {
					self::$tpl->assign($tag, $value);
				}
			}
		}
		
		public function display($data, $template) {
			$this->getData($data);
			self::$tpl->display($template);
			exit();
		}
	}
?>